package com.trainfinder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;


public class MonthsImpl {

	
	private static final SimpleDateFormat SHORT_DATE_FORMAT = new SimpleDateFormat("MMyy");
	private static final SimpleDateFormat MONTH = new SimpleDateFormat("MMM");
	
	/**
	 * @param args
	 */
	public Collection getMonths() {
		
		final Collection<ValueLabel> result = new ArrayList<ValueLabel>();
		
		Calendar calender = Calendar.getInstance();
		
		for(int i=0;i<5;i++) {
			String value = SHORT_DATE_FORMAT.format(calender.getTime());
			String label = MONTH.format(calender.getTime());
			calender.add(Calendar.MONTH,1);
			result.add(new ValueLabel(value ,label ));
		}

		return result;

	}
	


}
